<template>
    <div class="app">
        <!-- 首页搜索栏 -->
        <!-- <SearchBar></SearchBar> -->
        <!-- <component :is="$route.meta.navBarName"></component> -->
        <!-- <SearchBarForSearchPage></SearchBarForSearchPage> -->
        <!-- 购物车头部栏 -->
        <!-- <CartBar></CartBar> -->
        <!-- <component :is="page"></component> -->
        <transition-group enter-active-class="animated fadeInRight" leave-active-class="animated fadeOutLeft">
            <component :is="$route.meta.navBarName" key="group1"
            ></component>
            <router-view key="group2"></router-view>
            <component :is="$route.meta.bottomBarName" key="group3"></component>
        </transition-group>
        <FixedMenu v-show="$route.meta.fixedMenuShow" ></FixedMenu>
        <!-- <SearchComponentPage v-show="showSearchBar"></SearchComponentPage> -->
        <!-- <transition enter-active-class="animated fadeInRight" leave-active-class="animated fadeOutLeft">
            <router-view></router-view>
        </transition> -->
        <!-- 底部导航 -->
        <!-- <BottomBar></BottomBar> -->
        <!-- <transition enter-active-class="animated fadeInRight" leave-active-class="animated fadeOutLeft">
            <component :is="$route.meta.bottomBarName"></component>
        </transition> -->
    </div>
</template>
<script>
import SearchBar from "./components/searchBar"; //头部搜索栏
import BottomBar from "./components/bottomBar"; //底部导航
import CartBar from "./components/cartBar"; //购物车头部栏
import SearchBarForSearchPage from "./components/searchBarForSearchPage"; //搜索详情页面的头部栏
import DetailBottomBar from "./components/detailBottomBar"; //详情页的底部栏
import CartBottomBar from "./components/cartBottomBar"; //购物车的底部栏
// import Home from "./views/HomePage";//首页
// import ClassificationPage from "./views/ClassificationPage";//分类页
// import CartPage from "./views/CartPage";//购物车页
// import AboutPage from "./views/AboutPage";//关于我页面
// import DetailPage from "./views/DetailPage";//物品详情页面
// import SearchPage from "./views/SearchPage";//搜索物品详情页面
// import LoginPage from "./views/LoginPage";//登录页面
import SearchComponentPage from "./views/SearchComponentPage";//点击进入搜索页面
export default {
    components: {
        SearchBar,
        // Home,
        BottomBar,
        // ClassificationPage,
        // CartPage,
        CartBar,
        // AboutPage,
        // DetailPage,
        // SearchPage,
        SearchBarForSearchPage,
        // LoginPage,
        SearchComponentPage,
        DetailBottomBar,
        CartBottomBar
    },
    data() {
        return {
        };
    },
    methods:{
        // getSearchBar(){
        //     // this.$set(this.$route.query,"showSearchBar",true);
        //     this.showSearchBar=true;
        //     this.$route.meta.navBarName="SearchBarForSearchPage";
        // },
        // hiddenSearchBar(){
        //     console.log(111);
        //     this.showSearchBar=false;
        // }
    },
    mounted() {
        // this.$showAddCart();
        // this.$showErrorTip("网络错误!");
    }
};
</script>
<style lang="less">
@import "./less/base.less";
</style>
<style lang="less" scoped>
.app {
    max-width: 100%;
    margin: 0 auto;
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: @light;
    overflow: hidden;
    width: 100%;
    height: 100%;
}
</style>
